﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AgileFx.MVC.ValidationRules
{
    public class MaximumLengthRule : ValidationRule
    {
        public MaximumLengthRule(int length)
        {
            this.maxLength = length;
        }

        private int maxLength { get; set; }

        public override string GetAttributeString()
        {
            return string.Format("max({0})", maxLength);
        }
    }
}
